<html>
<head>
<title>Check Sales</title>
<style type="text/css">
body {
	font-family:verdana,arial,sans-serif;
	font-size:10pt;
	margin:30px;
	background-color:#ffcc00;
	}
</style>
</head>
<body>
<h1>Check Sales</h1>

<form name= "addorder" action="checksales_action.php" method="post">
       Select Interval: 
       <select name='sales'>
            <option>Select One</option>
            <option>Weekly</option>
            <option>Monthly</option>
            <option>Yearly</option>
       </select><br /><br />
       
       <?php

        $username="bsc353_4";
        $password="sonbeans";
        $database="bsc353_4";

        mysql_connect("clipper.encs.concordia.ca",$username,$password) or die ("Unable to connect to database");

        @mysql_select_db($database) or die ("Unable to select database");

        $branchquery= "Select branchID from StoreBranch";
        $allbranch=mysql_query($branchquery) or die ("Query did not work");
        $numbranch= mysql_numrows($allbranch);

        echo"Select Store Branch: ";
        echo"<select name='branchid'>";
        echo"<option>Select One</option>";
        $i=0;
        while($i<$numbranch)
            {
            $value=mysql_result($allbranch,$i,"branchID");
            $branch = mysql_query("SELECT name FROM StoreBranch WHERE branchID=$value") or die ("Query did not work");
            $branchname = mysql_result($branch,0,"name");
            echo "<option value=$value>$branchname - $value</option>";
            ++$i;
            }   
        echo"<option>All Of MBS</option>";
        echo"</select><br /><br />";

        mysql_close();

        ?>

       Group By:
       <select name='group'>
            <option value="">Select One</option>
            <option value="ISBN">ISBN</option>
            <option value="title">Title</option>
            <option value="subject">Subject</option>
            <option value="publisher">Publisher</option>
       </select></br><br />

  <input type="submit" value="Display">     
       
</form>


</body>
</html>